object ForGuardDemo extends App {
  val englishScores: Array[Int] = Array(75,58,90,65,52,88,72,45,68,70,59,82)
  var passCount = 0
  val totalStudents = englishScores.length
  val passScores = collection.mutable.ListBuffer[Int]()
  for (score <- englishScores if score >= 60) {
    passCount += 1
    passScores += score
    println(s"及格成绩: $score")
  }
  val passRate = (passCount.toDouble / totalStudents) * 100
  println(s"\n及格成绩列表 : $passScores")
  println(s"及格人数 : $passCount/$totalStudents")
  println(f"及格率 : $passRate%.1f%%")
}
